package org.nfyszny.zzzs.modules.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.nfyszny.zzzs.modules.entity.ZzzsRecordingOfProductionCapacity;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @Description: 生产能力备案
 * @Author: jeecg-boot
 * @Date: 2022-11-11
 * @Version: V1.0
 */
public interface IZzzsRecordingOfProductionCapacityService extends IService<ZzzsRecordingOfProductionCapacity> {

    Map<String, Object> getState(String productId);

    /**
     * 根据产品id查询
     *
     * @param queryWrapper
     * @param page
     * @return
     */
    IPage<ZzzsRecordingOfProductionCapacity> getListByProductId(QueryWrapper<ZzzsRecordingOfProductionCapacity> queryWrapper, Page<ZzzsRecordingOfProductionCapacity> page);

    /**
     * 新增生产能力备案
     *
     * @param zzzsRecordingOfProductionCapacity
     */
    void saveRecordingOfProductionCapacity(ZzzsRecordingOfProductionCapacity zzzsRecordingOfProductionCapacity);

    /**
     * 提交备案
     *
     * @param zzzsRecordingOfProductionCapacity
     */
    void submitRecord(ZzzsRecordingOfProductionCapacity zzzsRecordingOfProductionCapacity);

    @Transactional
    void change(ZzzsRecordingOfProductionCapacity zzzsRecordingOfProductionCapacity);

    @Transactional
    void review(ZzzsRecordingOfProductionCapacity zzzsRecordingOfProductionCapacity);

    /**
     * 查询已经备案完成的备案信息
     *
     * @param id
     * @return
     */
    ZzzsRecordingOfProductionCapacity getHaveInfoById(String id);
}
